-- GENERATED SPELL FOR [Spirit of Trey Lightforge] --


function spell0_11141(pUnit, Event) --@Defiling Aura,Self--
pUnit:FullCastSpellOnTarget(17695,pUnit)
pUnit:RegisterEvent('Sorts_11141', 0, 1)
end

function spell1_11141(pUnit, Event) --@Holy Light,Heal--
pUnit:FullCastSpellOnTarget(15493,pUnit)
pUnit:RegisterEvent('Sorts_11141', 2500, 1)
end

function spell2_11141(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(18164,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11141', 605, 1)
end

function Sorts_11141(pUnit, Event)
local choix_sorts_11141 = math.random(0, 2)
if choix_sorts_11141 == 0 then
pUnit:RegisterEvent('spell0_11141', 1, 1)
end
if choix_sorts_11141 == 1 then
pUnit:RegisterEvent('spell1_11141', 1, 1)
end
if choix_sorts_11141 == 2 then
pUnit:RegisterEvent('spell2_11141', 1, 1)
end
end

function mob11141_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11141', math.random(1500, 3000), 1)
end

function mob11141_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11141_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11141_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11141, 1, 'mob11141_Action')
RegisterUnitEvent(11141, 2, 'mob11141_Leave')
RegisterUnitEvent(11141, 3, 'mob11141_Kill')
RegisterUnitEvent(11141, 4, 'mob11141_Die')
